package com.jinke.api.modules.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jinke.api.modules.app.mapper.UserOrderTaskMapper;
import com.jinke.api.modules.app.model.UserOrderTask;
import com.jinke.api.modules.app.service.IUserOrderTaskService;
import org.springframework.stereotype.Service;

/**
 * @author huang
 * @data 2024-06-06
 */
@Service
public class UserOrderTaskServiceImpl extends ServiceImpl<UserOrderTaskMapper, UserOrderTask> implements IUserOrderTaskService {
    @Override
    public void saveByOrderId(Integer orderId) {
        Thread thread = new Thread(() -> {
            UserOrderTask task = new UserOrderTask();
            task.setOrderId(orderId);
            save(task);
        });
        thread.start();

    }
}
